package com.hnevc.foodserverapi.service.impl;


import com.hnevc.foodserverapi.dao.FoodsMapper;
import com.hnevc.foodserverapi.pojo.Foods;
import com.hnevc.foodserverapi.service.FoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Primary
public class FoodsServiceImpl implements FoodsService {
    @Autowired
    FoodsMapper foodsMapper;
    @Override
    public List<Foods> queryAllFoods() {
        return foodsMapper.queryAllFoods();
    }

    @Override
    public Foods queryDetails(int id) {
        return foodsMapper.queryFoodDetails(id);
    }
}
